<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <h2>二、实现过程</h2>
  <style>
    .border1 {
        width: 200px;
        height: 200px;
        border-style: solid;
        border-color: #96ceb4 #ffeead #d9534f #ffad60;
    }
    </style>
    <div class="border1"></div>
    <br>
  <style>
    .border2 {
        width: 0px;
        height: 0px;
        border-top: 200px solid transparent;
        border-bottom: 200px solid transparent;
        border-left: 200px solid transparent;
        border-right: 200px solid #ffad60;
    }
    </style>
    <div class="border2"></div>
    <br>
    <style>
      .border {
          width: 0;
          height: 0;
          border-style:solid;
          border-width: 0 50px 50px;
          border-color: transparent transparent #d9534f;
          position: relative;
      }
        .border::after {
            content: '';
            border-style: solid;
            border-width: 0 40px 40px;
            border-color: transparent transparent #96ceb4;
            position: absolute;
            top: 6px;
            left: -40px;
        }
    </style>
    <div class="border"></div>
    <h2>三、原理分析</h2>
    <div>利用旋转、隐藏，以及设置内容宽高等属性，就能够实现其他类型的三角形</div>
    <style>
      .box {
          /* 内部大小 */
          width: 0px;
          height: 0px;
          /* 边框大小 只设置两条边*/
          border-top: #4285f4 solid;
          border-right: transparent solid;
          border-width: 85px; 
          /* 其他设置 */
          margin: 50px;
      }
    </style>
    <div class="box"></div>
</body>
</html>